﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Liang.Net.Model
{
    /// <summary>
    /// 网络数据包头
    /// </summary>
    class NetDataHead
    {
        /// <summary>
        /// 左括号
        /// </summary>
        readonly byte BeginBrackets = Convert.ToByte('[');

        /// <summary>
        /// 右括号
        /// </summary>
        readonly byte EndBrackets = Convert.ToByte(']');

        /// <summary>
        /// 描述
        /// </summary>
        readonly byte[] Descript = Encoding.ASCII.GetBytes("length=");

        /// <summary>
        /// 数据长度
        /// </summary>
        Int32 DataSize = 0;

        //public byte[] GetDataHead(int nDataSize)
        //{
        //    DataSize = nDataSize;

        //    int nTotalSize = 2 + Descript.Length + sizeof(Int32);
        //    byte[] tmp = new byte[]
        //}
    }
}
